/* nixonFTP
 * FTP client version 0.1
 * Copyright (C) 2010 NIXON Development Corporation.
 * All rights reserved.
 * http://members.shaw.ca/nixon.com
*/
package nixonftp.ui;

import java.awt.Dimension;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.JPasswordField;

public class FtpPasswordInputField extends JPasswordField implements FocusListener {

	public FtpPasswordInputField(int columns) {
		super(columns);
		this.setPreferredSize(new Dimension(160,24));
		this.setMaximumSize(new Dimension(200, 28));
		this.addFocusListener(this);
	}

	public void focusGained(FocusEvent e) {
		if (this.getText().length() > 0) {
			this.selectAll();
		}
	}

	public void focusLost(FocusEvent e) {
	}
}